#ifndef __CONDITION_H
#define __CONDITION_H
#include "noncopyable.hpp"
#include "mutexlock.hpp"
#include <pthread.h>
namespace moqi
{
class MutexLock;
class Condition:public Noncopyable
{
public:
    Condition(MutexLock & mutex);
    ~Condition();
    void wait();
    void notify();
    void notifyAll();
private:
    pthread_cond_t _cond;
    MutexLock& _mutex; 
};
}
#endif //!__CONDITION_H
